/* 全局样式 */
:root {
  --primary-color: #e41e26;
  --secondary-color: #1a1a1a;
  --white-color: #ffffff;
  --light-gray: #f4f4f4;
  --accent-color: #d4af37;
}

.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 网格系统 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col-md-4, .col-md-6 {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 768px) {
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

.text-center {
  text-align: center;
  margin-left: 70px;
}

.mt-5 {
  margin-top: 3rem;
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

.btn {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.btn:hover {
  background-color: #c41920;
}

.page-title {
  background-color: var(--secondary-color);
  color: var(--white-color);
  padding: 100px 0 30px;
  text-align: center;
  margin-bottom: 30px;
}

.page-title h1 {
  font-size: 2.2rem;
}

.header-scrolled {
  background-color: var(--white-color);
}



.mobile-nav-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* 首页样式 */
.hero {
  height: 100vh;
  background-color: var(--secondary-color);
  color: var(--white-color);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-top: -80px; /* 抵消body的padding-top */
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero p {
  margin-bottom: 30px;
  max-width: 600px;
}

.about-section, .services-section, .portfolio-section, .news-section, .video-section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 1.8rem;
  position: relative;
  padding-bottom: 15px;
}

/* 移除标题下边框样式，改为在HTML中使用内联样式 */
.section-title h2:after {
  display: none;
}

/* 服务卡片 - 六边形布局 */
.services-hexagon {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.hexagon-item {
  width: 270px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-align: center;
}

.hexagon-inner {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  background-color: var(--primary-color);
  position: relative;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hexagon-icon {
  color: #fff;
  font-size: 36px;
  transition: all 0.4s ease;
}

.hexagon-content {
  padding: 30px 20px;
  background-color: #fff;
  border-radius: 10px;
  margin-top: -30px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  position: relative;
  z-index: -1;
}

.hexagon-item:hover .hexagon-inner {
  transform: rotate(30deg) scale(1.1);
  background-color: var(--secondary-color);
}

.hexagon-item:hover .hexagon-content {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(228,30,38,0.15);
}

.hexagon-content h4 {
  margin: 20px 0 15px;
  color: var(--primary-color);
  font-size: 0.6rem;
  font-weight: 500;
}

.hexagon-content p {
  font-size: 15px;
  margin-bottom: 20px;
  color: #666;
}

.hex-link {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 400;
  position: relative;
  padding-bottom: 5px;
  font-size: 0.6rem;
}

.hex-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.hexagon-item:hover .hex-link:after {
  width: 100%;
}

/* 案例展示 - 非对称布局 */
.portfolio-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.portfolio-main {
  flex: 1 1 60%;
  min-width: 300px;
}

.portfolio-side {
  flex: 1 1 35%;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.portfolio-featured {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 500px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.portfolio-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.portfolio-featured:hover img {
  transform: scale(1.05);
}

.portfolio-featured-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  transform: translateY(20px);
  opacity: 0.9;
  transition: all 0.5s ease;
}

.portfolio-featured:hover .portfolio-featured-content {
  transform: translateY(0);
  opacity: 1;
}

.portfolio-tag {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  margin-bottom: 15px;
}

.portfolio-featured-content h3 {
  font-size: 1rem;
  margin-bottom: 15px;
}

.portfolio-featured-content p {
  margin-bottom: 20px;
  opacity: 0.8;
}

.btn-outline-white {
  display: inline-block;
  border: 2px solid #fff;
  color: #fff;
  padding: 8px 20px;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.btn-outline-white:hover {
  background-color: #fff;
  color: var(--primary-color);
}

.portfolio-side-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 235px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.portfolio-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-side-item:hover img {
  transform: scale(1.05);
}

.portfolio-side-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
}

.portfolio-side-content h4 {
  font-size: 0.7rem;
  margin-bottom: 10px;
}

.portfolio-side-content a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.portfolio-side-content a i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.portfolio-side-content a:hover {
  opacity: 1;
}

.portfolio-side-content a:hover i {
  transform: translateX(5px);
}

.portfolio-filters ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.portfolio-filters li {
  margin: 0 10px 10px;
  padding: 5px 15px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-size: 14px;
}

.portfolio-filters li.active {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 图片占位符样式 */
.img-placeholder {
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  text-align: center;
  /*padding: 20px;*/
}

.hero .img-placeholder {
  height: 100vh;
  background-color: var(--secondary-color);
  color: var(--white-color);
}

.service-card .img-placeholder,
.news-card .img-placeholder,
.portfolio-item .img-placeholder {
  height: 200px;
}

.testimonial-item .img-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

/* 新闻动态 - 时间轴布局 */
.news-timeline {
  position: relative;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  left: 120px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e5e5e5;
}

.news-timeline-item {
  display: flex;
  margin-bottom: 50px;
  position: relative;
}

.news-timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-date {
  width: 120px;
  padding-right: 30px;
  text-align: right;
  position: relative;
}

.timeline-date:after {
  content: '';
  position: absolute;
  right: -9px;
  top: 15px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(228,30,38,0.2);
  z-index: 1;
}

.date-day {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.date-month {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
}

.date-year {
  display: block;
  font-size: 0.7rem;
  color: #999;
  margin-top: 3px;
}

.timeline-content {
  flex: 1;
  display: flex;
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: all 0.4s ease;
  margin-left: 10px;
}

.news-timeline-item:hover .timeline-content {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.timeline-image {
  width: 200px;
  overflow: hidden;
}

.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-timeline-item:hover .timeline-image img {
  transform: scale(1.1);
}

.timeline-text {
  flex: 1;
  padding: 25px;
}

.timeline-text h3 {
  font-size: 0.7rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.timeline-text p {
  color: #666;
  margin-bottom: 20px;
}

.timeline-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.timeline-link span {
  margin-right: 8px;
}

.timeline-link svg {
  fill: var(--primary-color);
  transition: transform 0.3s ease;
}

.timeline-link:hover svg {
  transform: translateX(5px);
}

@media (max-width: 768px) {
  .timeline-line {
    left: 80px;
  }

  .timeline-date {
    width: 80px;
  }

  .timeline-image {
    width: 120px;
  }
}

@media (max-width: 576px) {

  .timeline-line {
    display: none;
  }

  .hexagon-content h4 {
    margin: 20px 0 15px;
    color: var(--primary-color);
    font-size: 0.4rem;
  }

  .news-timeline-item {
    flex-direction: column;
  }

  .timeline-date {
    width: 100%;
    text-align: left;
    padding: 0 0 15px 0;
    display: flex;
    align-items: center;
  }

  .timeline-date:after {
    display: none;
  }

  .date-day {
    margin-right: 5px;
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
  }

  .date-month {
    margin-right: 5px;
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
  }

  .timeline-content {
    flex-direction: column;
  }

  .timeline-image {
    width: 100%;
    height: 200px;
  }
  .timeline-text h3 {
    font-size: 0.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
  }
  .portfolio-featured-content h3 {
    font-size: 0.5rem;
    margin-bottom: 15px;
  }

  .portfolio-side-content h4{
    font-size: 0.4rem;
  }
  .text-center{
    margin-left: 0;
  }
}

/* 页脚 */
footer {
  background-color: var(--secondary-color);
  color: var(--white-color);
  padding: 60px 0 20px;
  margin-top: 50px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-column h3 {
  margin-bottom: 20px;
  color: var(--accent-color);
  font-size: 1.2rem;
}

.footer-column p {
  font-size: 14px;
  line-height: 1.6;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: var(--white-color);
  transition: color 0.3s ease;
  font-size: 14px;
}

.footer-column ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 14px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white-color);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
}

.qr-code img {
  width: 120px;
  margin-top: 15px;
}

/* 轮播控制 */
.carousel-controls {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.carousel-control {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--white-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  cursor: pointer;
}

/* 数字计数器动画 */
.counter-section {
  background-color: var(--secondary-color);
  color: var(--white-color);
  padding: 50px 0;
  margin: 40px 0;
}

.counter-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.counter-item {
  text-align: center;
  padding: 20px;
}

.counter {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.counter-title {
  font-size: 1rem;
}

/* 自动滚动轮播 */
.auto-scroll-container {
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}

.auto-scroll-wrapper {
  display: flex;
  flex-direction: column;
  transition: transform 0.5s ease;
}

.auto-scroll-item {
  flex: 0 0 100%;
  padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 991px) {
  .hexagon-content h4 {
    margin: 20px 0 15px;
    color: var(--primary-color);
  }
  .nav-menu {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--white-color);
    flex-direction: column;
    padding: 20px;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    margin: 15px 0;
  }

  .mobile-nav-toggle {
    display: block;
  }


  .service-card {
    flex: 0 0 calc(50% - 20px);
  }
}

@media (max-width: 768px) {
  .hexagon-content h4 {
    margin: 20px 0 15px;
    color: var(--primary-color);
  }
  .section-title h2 {
    font-size: 1.2rem;
  }

  .service-card {
    flex: 0 0 calc(100% - 20px);
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .hexagon-content h4 {
    margin: 20px 0 15px;
    color: var(--primary-color);
  }


}

/* 动画样式 */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate[data-animation="fadeInLeft"] {
  transform: translateX(-30px);
}

.animate[data-animation="fadeInRight"] {
  transform: translateX(30px);
}

.animate[data-animation="fadeInUp"] {
  transform: translateY(30px);
}

.animate[data-animation="fadeInDown"] {
  transform: translateY(-30px);
}

.animate[data-animation="fadeIn"] {
  transform: translateY(0);
}

.animated[data-animation="fadeInLeft"],
.animated[data-animation="fadeInRight"],
.animated[data-animation="fadeInUp"],
.animated[data-animation="fadeInDown"],
.animated[data-animation="fadeIn"] {
  transform: translateX(0) translateY(0);
}

/* Banner轮播 */
.banner-swiper {
  width: 100%;
  height: 100vh;
}

.banner-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.banner-swiper .img-placeholder {
  width: 100%;
  height: 100%;
}

/* 修复首页滚动问题 */
.home-page {
  height: auto;
  overflow-y: auto;
}

.hero .swiper-container {
  height: 100vh;
}

/* 修复服务卡片轮播 */
.services-carousel {
  position: relative;
  overflow: hidden;
}

/* 视频部分 */
.video-container {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  cursor: pointer;
}

.video-container .fas {
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.video-container:hover .fas {
  transform: scale(1.2);
}